
{extend name='public/base' /}

{block name="content"}

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="" lay-filter="form">
                <input type="hidden" name="id" value="{$info.id}">
                <div class="layui-form-item">
                    <label class="layui-form-label">缴费金额</label>
                    <div class="layui-input-block">
                        <input type="number" name="amount" value="{$info.real_amount/100}" disabled autocomplete="off" placeholder="请输入需缴金额" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label label-required-next">凭证：</label>
                    <div class="layui-input-block">
                        <div class="layui-upload-drag" id="editimg">
                            <img id="show_id" style="width: 260px;margin: 10px 0 10px 0px;height: 150px" src="{$info.other_certificate}" alt="上传附件" width="120" height="120">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">收费方式*</label>
                    <div class="layui-input-inline">
                        <select name="pay_type" lay-search=""  lay-verify="required">
                            <option value="" >请选择</option>
                            {volist name="pay_type" id="t"}
                            <option value="{$t.id}" >{$t.name}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入内容" class="layui-textarea" name="remark"></textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-layout-admin " style="width: 100%">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0px;text-align: center;">
                            <button class="layui-btn" lay-submit="" lay-filter="confirm">通过</button>
                            <button class="layui-btn layui-btn-danger" lay-submit=""  lay-filter="cancel">不通过</button>
                        </div>
                    </div>
                </div>

            </form>
        </div>
    </div>
</div>

{/block}

{block name="js"} <!--js处理区-->


<script>
    layui.use(['element', 'table', 'form', 'jquery', 'lucky','opTable'], function () {
        var element = layui.element;
        var form = layui.form;
        var $ = layui.jquery;
        var lucky=layui.lucky;
        var opTable = layui.opTable;
        var table = layui.table;
        form.render();
        //通过
        form.on('submit(confirm)', function (data) {
            console.log(data.field)
            data.field.pay_status = 1;
            lucky.FormSubmit("{:url('common/UpdateCost')}",data.field,true);
            return false;
        });
        //不通过
        form.on('submit(cancel)', function (data) {
            console.log(data.field)
            data.field.pay_status = 0;
            lucky.FormSubmit("{:url('common/UpdateCost')}",data.field,true);
            return false;
        });
    });

</script >

{/block}
